require( '../../test/config' );
var gulp = require('gulp');
var qModel = require( '../../app/components/backend/db/models/questionnaire' );
gulp.task('initGauge', function () {

});

gulp.task('initQuestionnaire', function () {
  var fs = require('fs');
  var testData = JSON.parse(fs.readFileSync('test/components/backend/db/dao/questionnaire_data.json', 'utf8'));
  qModel.collection.insert(testData, function(err, docs){
    if (err) {
      throw err;
    } else {
      console.info('%d questionnaires were successfully stored.', docs.result.n);
    }
  });
});